programming4us
           
 
 
Windows

SOA with .NET and Windows Azure : WCF Discovery (part 3) - Discovery Proxies for Managed Discovery & Implicit Service Discovery

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
2/16/2011 5:55:20 PM

Discovery Proxies for Managed Discovery

Ad hoc discovery is a suitable approach for static and smaller local service networks, where all services live on the same subnet and multicasting probes or announcements don’t add a lot of network chatter.

Larger environments, with services distributed across multiple subnets (or highly dynamic networks), need to consider a Discovery Proxy to overcome the limitations of ad hoc probing. A Discovery Proxy can listen to UDP announcements on the standard udpAnnouncementEndpoint for service registration and de-registration, but also expose DiscoveryEndpoint via a WCF SOAP binding.

The implementation requirements for a Discovery Proxy can vary from a simple implementation that keeps an in-memory cache of available services, to implementations that require databases or scale-out solutions, like caching extensions provided by Windows Server AppFabric. WCF provides a DiscoveryProxy base class that can be used for general proxy implementations.

Discovering from a Discovery Proxy

Discovering services registered with a Discovery Proxy follows the steps for ad hoc discovery discussed earlier. Instead of multicasting a UDP message, DiscoveryClient now needs to contact the Discovery Proxy. Details about the discovery contract are encapsulated in the DiscoveryEndpoint class. Its constructor only takes parameters for the communication protocol details, binding, and address.

Here we are configuring a discovery client to query the Discover Proxy:

Example 9.
DiscoveryEndpoint proxyEndpoint =
new DiscoveryEndpoint(
new NetTcpBinding(),
new EndpointAddress(proxyAddressText.Text));
this.discoveryClient = new DiscoveryClient(proxyEndpoint);

Implicit Service Discovery

Our coverage of WCF Discovery so far has focused on the explicit discovery of services. However, it is worth noting that WCF Discovery can also perform the same queries behind-the-scenes, when you configure endpoints as DynamicEndpoint programmatically or in the configuration file. This allows for highly dynamic, adaptive environments where virtually no location-specific details are maintained as part of code or configuration.

SOA Principles & Patterns

The consistent application of the Service Discoverability  principle is vital for WCF Discovery features to be succesfully applied across a service inventory, especially in regard to managed discovery. The application of Canonical Expression ties directly to the definition and expression of any published service metadata. And, of course, Metadata Centralization  represents the effective incorporation of a service registry as a central discovery mechanism.


A client endpoint, for example, can be configured to locate a service that matches on scope and contract. In the following example, we configure DynamicEndpoint to locate a service with matching contract and metadata:

Example 10.
<client>
<endpoint kind="dynamicEndpoint"
binding="basicHttpBinding"
contract="ICustomerService"
endpointConfiguration="dynamicEndpointConfiguration"
name="dynamicCustomerEndpoint" />
</client>
<standardEndpoints>
<dynamicEndpoint>
<standardEndpoint name="dynamicEndpointConfiguration">
<discoveryClientSettings>
<findCriteria duration="00:00:05" maxResults="1">
<types>
<add name="ICustomerService"/>
</types>
<extensions>
<MyCustomMetadata>
Highly Scalable
</MyCustomMetadata>
</extensions>
</findCriteria>
</discoveryClientSettings>
</standardEndpoint>
</dynamicEndpoint>
</standardEndpoints>


With this configuration, the service consumer can create a proxy object to the server with the following code:

Example 11.
ICustomerService svc =
new ChannelFactory<ICustomerService>
("dynamicCustomerEndpoint").CreateChannel();
Other -----------------
- SOA with .NET and Windows Azure : WCF Discovery (part 2) - Locating a Service Ad Hoc & Sending and Receiving Service Announcements
- Windows 7 : Working with Network Files Offline (part 3) - Prohibiting a Network Folder from Being Made Available Offline & Encrypting Offline Files
- Windows 7 : Working with Network Files Offline (part 2) - Changing the Amount of Disk Space Used by Offline Files
- Windows 7 : Working with Network Files Offline (part 1) - Activating the Offline Files Feature & Making a File or Folder Available for Offline Use
- Windows 7 : Sharing Resources with the Network (part 2) - Monitoring Your Shared Resources
- Windows 7 : Sharing Resources with the Network (part 1) - Setting Sharing Options & Creating User Accounts for Sharing
- Windows 7 : Accessing a Shared Printer
- Windows 7 : Creating a Network Location for a Remote Folder
- Windows Vista: Windows Reliability and Performance Monitor and Task Manager
- Windows Vista: Configuring Internet Explorer 7.0 - Dynamic Security and Protected Mode
- Windows 7: Mapping a Network Folder to a Local Drive Letter
- SOA with .NET and Windows Azure: WCF Extensions - WCF Router (part 2) - Routing Configuration
- SOA with .NET and Windows Azure: WCF Extensions - WCF Router (part 1) - The RoutingService Class & Routing Contracts
- Windows 7: Accessing Shared Network Resources
- Windows 7: Managing Wireless Network Connections (part 4) - Creating User-Specific Wireless Connections
- Windows 7: Managing Wireless Network Connections (part 3) - Reordering Wireless Connections
- Windows 7: Managing Wireless Network Connections (part 2) - Working with Wireless Connection Properties
- Windows 7: Managing Wireless Network Connections (part 1) - Creating an Ad Hoc Wireless Network
- Windows7: Managing Network Connections (part 5) - Using a Network Connection to Wake Up a Sleeping Computer
- Windows7: Managing Network Connections (part 4) - Finding a Connection’s MAC Address
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us